package cron

import (
	"shop/internal/lock"
	"time"
)

func init() {
	getInstance := GetInstance()
	_, _ = getInstance.client.AddFunc("@every 30s", func() {
		lockKey := "order"
		lockValue := "lock-value"
		lock.GetInstance().TryLock(lockKey, lockValue, 10*time.Second, func() {
			//fmt.Println("getLock")
		})
	})
}
